home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14294 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.mindspring.com!usenet
  2. From: Danette & Murray Root <mroot@atl.mindspring.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: A quick newbie question...hopefully...HELP!
  5. Date: Sat, 13 Apr 1996 02:08:05 -0400
  6. Organization: MindSpring Enterprises, Inc.
  7. Message-ID: <316F44C5.4324@atl.mindspring.com>
  8. References: <4kn8gk$6t1@info.evansville.net>
  9. NNTP-Posting-Host: user-168-121-127-88.dialup.mindspring.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.01Gold (Win95; I)
  14.  
  15. gilligan wrote:
  16. > Hi!
  17. >         I am just starting at C, and have a question...one of my problems is I
  18. > have to create a type of "Word Processor" where, regardless of number
  19. > of carriage returns or spaces, I have to cram as many words as
  20. > possible onto one line,
  21.  
  22. ---- snip a lot because my newsreader will not let me reply with less new stuff than I quote ----
  23.  
  24. Look at scanf() and family. You can do a lot of whitespace trimming, then use strtok() to remove the
  25. <cr>'s you don't want. Then strtok() again to put in the necessary <cr>'s.
  26.  
  27. Don't forget a LOT of error-checking.
  28.